package com.zbkj.admin.config;

import com.zbkj.service.util.wework.WXBizMsgCrypt;
import lombok.SneakyThrows;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class WeWorkConfiguration {


    @Value("${we-work.books.notify.token}")
    private String token;

    @Value("${we-work.books.notify.encodingAesKey}")
    private String encodingAesKey;

    @Value("${we-work.corp.id}")
    private String corpId;

    @Bean
    @SneakyThrows
    public WXBizMsgCrypt wxBizMsgCrypt() {
        return new WXBizMsgCrypt(token, encodingAesKey, corpId);
    }
}
